// services/good/fetchGoodsList.js
const config = require('../../utils/config');
const { apiRequest } = require('../_utils/apiRequest');

const fetchGoodsList = async (userId) => {
  return apiRequest({
    url: `${config.backendApiUrl}/users/${userId}/goods`,
    method: 'GET',
  }); 
};

const fetchAllWines = async () => {
  return apiRequest({
    url: `${config.backendApiUrl}/wines`,
    method: 'GET',
  });
};

module.exports = { fetchGoodsList, fetchAllWines };